package com.surendra.coffeemaker;
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;



public class RecipeTest {
public static Recipe r;
	@Before
	public void setUp() throws Exception {
		r= new Recipe();
	}

	@After
	public void tearDown() throws Exception {
		r=null;
	}

	@Test
	/**
	 * test toString
	 */
	public void toStringTest() {
	r.setName("Coffee");
		assertEquals(r.getName(), r.toString());
	}@Test
	/**
	 * test amount less than zero
	 */
public void amountLessThanZeroTest(){
		r.setAmtCoffee(-1);
		r.setAmtChocolate(-1);
		r.setAmtSugar(-1);
		r.setPrice(-1);
		r.setAmtMilk(-1);
		assertEquals(0, r.getAmtCoffee());
		assertEquals(0,r.getAmtChocolate());
		assertEquals(0,r.getAmtSugar());
		assertEquals(0,r.getPrice());
		assertEquals(0, r.getAmtMilk());
	}
}
